package com.six.demo;

public class SliverCard extends Card{
    public SliverCard(String cardId, String name, String phone, double money) {
        super(cardId, name, phone, money);
    }

    @Override
    public void consume(double money) {
        System.out.println("您当前消费：" + money);
        System.out.println("优惠后的价格：" + money * 0.9);
        if (getMoney() < money * 0.9) {
            System.out.println("余额不足！");
            return;
        }
        //更新银卡账户余额
        setMoney(getMoney() - money * 0.9);
    }
}
